"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
# from django.contrib import admin
from . import views
urlpatterns = [
    #前台首页
    url(r'^$', views.index,name='home_index'),
    #列表页
    url(r'^lists/(?P<tid>[0-9]+)$',views.lists,name='home_list'),
    #详情页
    url(r'^info/(?P<gid>[0-9]+)$', views.info,name='home_info'),
    #注册页面
    url(r'^register/$', views.register,name='home_register'),
    #登录页面
    url(r'^login/$', views.login,name='home_login'),
    #退出登录页面
    url(r'^logout/$', views.logout,name='home_logout'),
    # 短信发送
    url(r'^sendsms/$', views.sendsms,name='home_sendsms'),
    # 购物车添加
    url(r'^cart/add/$', views.cartadd,name='home_cartadd'),    
    # 购物车页面
    url(r'^cart/index/$', views.cartindex,name='home_cartindex'),

    # 购物车修改
    url(r'^cart/edit/$', views.cartedit,name='home_cartedit'),
    

    # 购物车删除
    url(r'^cart/del/$', views.cartdel,name='home_cartdel'),

    #清空购物车
    url(r'^carts/del/$', views.cartsdel,name='home_cartsdel'),



    # 确认订单
    url(r'^confirm/order/$', views.confirmorder,name='home_confirmorder'),

    # 添加收货地址
    url(r'^address/insert/$', views.addressinsert,name='home_addressinsert'),
    # 设置默认指定
    url(r'^address/set/$', views.addressset,name='home_addressset'),

    # 提交订单
    url(r'^order/insert/$', views.orderinsert,name='home_orderinsert'),

    #付款页面

    url(r'^order/buy/(?P<bid>[0-9]+)/$', views.buy,name='home_buy'),

    # 我的订单
    url(r'^myorders/$', views.myorders,name='home_myorders'),
    #前台个人信息
    url(r'^myindex/(?P<mid>[0-9]+)/$', views.myindex,name='home_myindex'),
    #修改个人信息
    url(r'^myindexedit/(?P<mid>[0-9]+)/$', views.myindexedit,name='home_myindexedit'),





]
